package com.tinama.jedis01.queue;

import java.util.concurrent.TimeUnit;

/**
 * @author lgc
 * @createDate 2020/10/14 - 9:36
 */
public class BlockingTest {
    public static void main(String[] args){
        new Thread(()->{
            Blocking.putString("a");
            Blocking.putString("b");
            Blocking.putString("c");
            Blocking.putString("d");
        }).start();

        try {
            TimeUnit.SECONDS.sleep(3);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        new Thread(()->{
            Blocking.takeString();
        }).start();


    }
}
